<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@page import="avicit.platform6.core.locale.PlatformLocalesJSTL"%>
<%@page import="java.util.Locale"%>
<%@page import="avicit.platform6.api.session.SessionHelper"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ page import="avicit.platform6.commons.utils.ViewUtil"%>
<%@ taglib prefix="sec"
           uri="/WEB-INF/tags/shiro.tld"%>
<%@page import="avicit.platform6.api.sysshirolog.impl.AfterLoginSessionProcess"%>
<%
    Object lang=session.getAttribute(AfterLoginSessionProcess.SESSION_CURRENT_LANGUAGE_CODE);
    String languageCode="zh_CN";
    if(lang!=null){
        languageCode=lang.toString();
    }
    Locale locale =SessionHelper.getLocaleByUser(request);
%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>代码选择</title>
    <base href="<%=ViewUtil.getRequestPath(request)%>">
    <jsp:include
            page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
    <script type="text/javascript"
            src="avicit/cbb/techclass/tabledefine/commtempletmanager/comm_sys_code_manager.js"></script>
    <jsp:include page="/avicit/im/common/ImUIJSCSSInclude.jsp"></jsp:include>
    <script type="text/javascript"
            src="avicit/cbb/techclass/tabledefine/commtempletmanager/locale/language_<%=languageCode%>.js"></script>
    <script type="text/javascript">
        var dialogId = "${dialogId}"; //打开页面传递的模块ID
        fid = "${fId}";
        tid = "${tId}";
        var baseurl = "<%=ViewUtil.getRequestPath(request)%>";
    </script>
    <style type="text/css">
        .textbox {
            border: solid 1px #a5acb5;
        }

        .input,img {
            vertical-align: middle;
        }
    </style>
</head>
<body id="myBody" class="easyui-layout">
<form id="formSelect" method="post">
    <div
            data-options="region:'west',title:'',split:true,border:false,collapsible:false"
            style="height: 0; width:707px; overflow: hidden; font-size: 0;" id="sgrid">
        <div id="tb">
            <sec:accesscontrollist hasPermission="3"
                                   domainObject="commtempletmanager_comm_sys_code_manager_button_submitButton">
                <%-- 确定 --%>
                <a class="easyui-linkbutton" plain="true" iconCls="icon-im-submit"
                   onclick="submitSelest('formSelect', 'submitButton');"
                   href="javascript:void(0);" id="submitButton"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.button.quote.button.confirm","i18n.lantop",locale)%></a>
            </sec:accesscontrollist>
            <sec:accesscontrollist hasPermission="3"
                                   domainObject="commtempletmanager_comm_sys_code_manager_button_searchField">
                <%-- 查询 --%>
                <a class="easyui-linkbutton" plain="true" iconCls="icon-im-search"
                   onclick="searchField();" href="javascript:void(0);"
                   id="searchField"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.button.quote.button.search","i18n.lantop",locale)%></a>
            </sec:accesscontrollist>
            <sec:accesscontrollist hasPermission="3"
                                   domainObject="commtempletmanager_comm_sys_code_manager_button_backButton">
                <%-- 返回 --%>
                <a id="backButton" class="easyui-linkbutton"
                   data-options="iconCls:'icon-im-back', plain : true"
                   onclick="closeWindow();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.button.quote.button.return","i18n.lantop",locale)%></a>
            </sec:accesscontrollist>
        </div>
        <table id="commTempletSysCodeDataGrid" class="easyui-datagrid"
               data-options="
					rownumbers: true,
					animate: true,
					collapsible: false,
					fitColumns: true,
					autoRowHeight: false,
					singleSelect: true,
					pagination:true,
					pageSize:20,
					pageList:[100,150,200],
		    		striped:true,
					fit:true,
					method: 'post',
					toolbar: '#tb',
					onClickRow:reloadCodeDataGrid,
					url: 'platform/aos/commtempletmanagerController/getCommTempletSysCodeData.json'
				">
            <thead>
            <tr>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtempletmanager_comm_sys_code_manager_datagrid_ID">
                    <th data-options="field:'ID', halign:'center',hidden:true"
                        title="主键ID" width="20">主键ID</th>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtempletmanager_comm_sys_code_manager_datagrid_LOOKUP_TYPE">
                    <%-- 代码类型 --%>
                    <th
                            data-options="field:'LOOKUP_TYPE', halign:'center', align:'center', sortable:false,editor:{type:'text'}"
                            width="100" title="字段英文名"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.button.quote.table.codeType","i18n.lantop",locale)%></th>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtempletmanager_comm_sys_code_manager_datagrid_LOOKUP_TYPE_NAME">
                    <%-- 代码名称 --%>
                    <th
                            data-options="field:'LOOKUP_TYPE_NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}"
                            width="100" title="字段名"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.button.quote.table.codeName","i18n.lantop",locale)%></th>
                </sec:accesscontrollist>
            </tr>
            </thead>
        </table>
    </div>
    <div data-options="region:'center'"
         style="height: 0; overflow: hidden; font-size: 0;">
        <table id="commTempletSysCodeSonDataGrid" class="easyui-datagrid"
               data-options="
							rownumbers: true,
							animate: true,
							collapsible: false,
							fitColumns: true,
							autoRowHeight: false,
							singleSelect: true,
							pagination:true,
							pageSize:15,
							pageList:[10,15,20],
				    		striped:true,
							fit:true,
							method: 'post'
						">
            <thead>
            <tr>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtempletmanager_comm_sys_code_manager_datagrid_CODE_ORDER">
                    <%-- 顺序 --%>
                    <th
                            data-options="field:'CODE_ORDER', halign:'center', align:'center', sortable:false,editor:{type:'text'}"
                            width="100" title="字段英文名"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.button.quote.table2.order","i18n.lantop",locale)%></th>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtempletmanager_comm_sys_code_manager_datagrid_LOOKUP_NAME">
                    <%-- 显示值 --%>
                    <th
                            data-options="field:'LOOKUP_NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}"
                            width="100" title="字段名"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.button.quote.table2.showValue","i18n.lantop",locale)%></th>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtempletmanager_comm_sys_code_manager_datagrid_LOOKUP_CODE">
                    <%-- 真实值 --%>
                    <th
                            data-options="field:'LOOKUP_CODE', halign:'center', align:'center', sortable:false,editor:{type:'text'}"
                            width="100" title="字段类型"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.button.quote.table2.trueValue","i18n.lantop",locale)%></th>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtempletmanager_comm_sys_code_manager_datagrid_VALID_FLAG">
                    <%-- 是否有效 --%>
                    <th
                            data-options="field:'VALID_FLAG', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterYn"
                            width="100" title="长度"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.button.quote.table2.iseffective","i18n.lantop",locale)%></th>
                </sec:accesscontrollist>
            </tr>
            </thead>
        </table>
    </div>
</form>
</body>
</html>
